package com.bawei.module_main.ui.splash

import com.bawei.lib_common.base.BaseViewModel
import com.bawei.module_main.model.AdModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

/**
 * @author yaotianxue
 * @description
 * @date 2025/5/26
 */
@HiltViewModel
class SplashViewModel @Inject constructor(private val repository: SplashRepository):BaseViewModel() {

    var mAppStartAdInfo:AdModel ? = null //广告数据

    /**
     * 广告数据
     */
    fun adList(){
        execute(
            action = repository.adList(),
            onFinish = {
                mAppStartAdInfo = it.data.firstOrNull()
            }
        )

    }
}